package icu.feigroup.domain.activity.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * projectName:icu.feigroup.domain.activity.model.valobj
 *
 * @author 飞
 * @since 2025/2/20 10:14
 * description:
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum DiscountTypeEnum {

    BASE(0,"基础优惠"),
    TAG(1,"人群标签优惠"),
    ;
    private Integer code;
    private String message;

    public static DiscountTypeEnum get(Integer code){
        switch (code){
            case 0:
                return BASE;
            case 1:
                return TAG;
            default:
                throw new RuntimeException("error code");
        }
    }
}
